<template>
  <div class="newBlog">
    <div class="left">
      <my-index-oneblog v-for="(item, id) in blogs"
                        :blog-item="item" :key="id"
                        v-if="id % 2 === 0"></my-index-oneblog>

    </div>

    <div class="right ">
      <my-index-oneblog v-for="(item, id) in blogs"
                        :blog-item="item" :key="id"
                        v-if="id % 2 === 1"></my-index-oneblog>
    </div>
  </div>
</template>

<script>
import myIndexOneblog from "./myIndexOneblog";
export default {
  name: "myIndexNewshow",
  components: {
    myIndexOneblog
  },
  props: {
    blogs: {
      type: Array,
      default() {
        return []
      }
    }
  }
}
</script>

<style scoped>
.newBlog{
  display: flex;
  flex-direction: row;
  margin: 10px 10px 10px 10px;
  width: 100%-20px;
  height: auto;
}
.left{
  width: 50%-15px;
  margin-right: 15px;
}
.right{
   width: 50%-15px;
   margin-left: 15px;
 }
</style>